#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<map>
#include<string>
#include<stack>

using namespace std;

const int MAX = 1e5 + 3;
int n, k;
int a[MAX][2];

bool check(int val)
{
	long long cnt = 0;
	for (int i = 0; i < n; ++i)
			cnt += 1LL*(a[i][0]/val) * (a[i][1]/val);

	return cnt >= k;
}
int main()
{
	cin >> n >> k;
	for (int i = 0; i < n; ++i)
		cin >> a[i][0] >> a[i][1];

	int left = 0, right = MAX;
	while (left < right)
	{
		int mid = left + (right - left+1) / 2;
		if (check(mid)) left = mid;
		else right = mid - 1;
	}

	cout << left << "\n";
	return 0;
}